import React, { useReducer } from 'react'

import reducer from './reducer';

export default function Home() {
  const [state, dispatch] = useReducer(reducer, { count: 0 });
  
  return (
    <div>
      <h2>Home当前计数：{state.count}</h2>
      <button onClick={e => dispatch({type: "IN_CREMENT"})}>+1</button>
      <button onClick={e => dispatch({type: "DE_CREMENT"})}>-1</button>
    </div>
  )
}
